home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 5207 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.8 KB  |  44 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: newsfeed.acns.nwu.edu!ftpbox!mothost!schbbs!news
  3. From: bcerveny@athena-e.eurpd.csg.mot.com (Brian Cerveny)
  4. Subject: Re: Ceck out this bug. What the *** is SASC/6.56 doing?
  5. Organization: Motorola, Inc., Cellular Subscriber Group
  6. Date: 11 Mar 1996 09:30:40 -0600
  7. Message-ID: <v24trvir4v.fsf@athena-e.eurpd.csg.mot.com>
  8. In-Reply-To: patrick.hanevold@login.eunet.no's message of 10 Mar 1996 05:43:08 GMT
  9. X-Newsreader: Gnus v5.0.15
  10. References: <1120.6643T91T406@login.eunet.no>
  11. Sender: bcerveny@athena-e.eurpd.csg.mot.com
  12. Nntp-Posting-Host: 144.188.65.22
  13.  
  14. In article <1120.6643T91T406@login.eunet.no> patrick.hanevold@login.eunet.no (Patrick Hanevold) writes:
  15.  
  16. > Can anyone explain this? Try compiling this with a SC default SCOPTIONS
  17. > file, and start it from CLI. It only crashes from CLI.
  18. > This one was REALY fun finding. Dealyed ChunkyScreen a couple of days.
  19. > void main(void)
  20. > {
  21. >     int     x,y,n;
  22. >     UBYTE   Buffer[ScreenWidth];
  23. >     ULONG   Palette[256*3+2];           // This one causes the bug.
  24. >     struct  Screen  *Scr=OpenScreenTags(NULL,
  25. >         SA_Width,           320,
  26. >         SA_Height,          256,
  27. >         SA_Depth,           8,
  28. >         TAG_END);
  29.  
  30. You're probably overflowing your stack.  That ULONG Palette is 6144 bytes,
  31. and since it is a local variable it is stored on the stack.
  32.  
  33. Look at your CLI stack size.  If it's low (especially lower than 7000)
  34. then you need more.  Set it to 20K and I bet you don't crash.
  35.  
  36. In SAS you can set long __stack = 10000 or whatever to force the program's
  37. stack to be larger.  Then you won't have to worry about the CLI stack.
  38. -- 
  39. Brian J. Cerveny, Software Engineer (bcerveny@eurpd.csg.mot.com)
  40. Motorola Inc., European Cellular Subscriber Division
  41. 600 N. US Hwy 45, Libertyville, Illinois 60048, USA
  42. Work phone: (847) 523-5788    FAX: (847) 523-2545
  43.